import {
  queryOnlineUserList,
} from '../services/monitoring'

export default {
  namespace: 'monitoring',
  state: {
    
  },

  subscriptions: {
    // setup({ dispatch, history }) {
    //   dispatch({
    //     type: 'queryAddressJson',
    //     payload: {},
    //   })
    // },
  },

  effects: {
    *queryOnlineUserList({ payload }, { call }) {
      const data = yield call(queryOnlineUserList, payload)
      // const { success, message, status, ...other } = data
      return data
      // if (success) {
      //   return data
      // } else {
      //   throw data
      // }
    },
  },
  reducers: {
    setState(state, action) {
      return {
        ...state,
        ...action.payload,
      }
    },
  },
}
